package symbol;

import java.util.ArrayList;
import java.util.List;

public class TypeList {
	static public List<Type> typeList = new ArrayList<Type>();
	static public void Init_TypeList(){
		typeList.clear();
		
		typeList.add(t_LONG);
		typeList.add(t_INT);
		typeList.add(t_BOOLEAN);
		typeList.add(t_INT_A);
		typeList.add(t_LONG_A);
	}
	public static Type getType(String typeName){
		for(int i = 0; i < typeList.size(); i++)
			if(typeList.get(i).getTypeName().equals(typeName))
				return typeList.get(i);
		
		return null;
		
	}
	public static Type t_LONG = new Type("long");
	public static Type t_INT = new Type("int", t_LONG);
	public static Type t_BOOLEAN = new Type("boolean");
	public static Type t_INT_A = new Type("int[]");
	public static Type t_LONG_A = new Type("long[]");
}
